package com.innerex.inexclear.webapp.action;

import java.io.Serializable;
import java.util.List;

import com.innerex.inexclear.core.service.ClearingRuleManager;

public class ClearingRuleList extends BasePage implements Serializable {

	private static final long serialVersionUID = 972359310602744018L;

	protected ClearingRuleManager clearingRuleManager;

	public ClearingRuleList() {
		setSortColumn("id");
	}

	/**
	 * A setter method called by JSF framework in order to inject a manager.
	 * 
	 * @param clearingRuleManager
	 */
	public void setClearingRuleManager(ClearingRuleManager clearingRuleManager) {
		this.clearingRuleManager = clearingRuleManager;
	}

	/**
	 * Return the complete list of ClearingRules.
	 * 
	 * @return
	 */
	public List<?> getClearingRules() {
		return sort(clearingRuleManager.getClearingRules());
	}
}
